package com.usian.admin.controller;

import com.usian.admin.LoginControllerApi;
import com.usian.admin.service.AdLoginService;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/login")
@Api(value = "登录模块",tags = "登录")
public class AdLoginController implements LoginControllerApi {

    @Autowired
    AdLoginService adLoginService;

    @Override
    @PostMapping("/in")
    @ApiOperation(value = "登录接口",notes = "输入用户名和密码")
    public ResponseResult login(@RequestBody AdUserDto adUserDto) {

        return adLoginService.login(adUserDto);
    }
}
